
function set_barcode(i, param) {
  var barcode = [];
  var barcode2 = [];
  var BinNum =  app.searchdata.BinNum;
  var WarehouseCode = app.searchdata.WarehouseCode;


  var d = new Date();
  var t = d.getTime();
  var no = 0;
  t = no ? no : t;
  var count = 1;
  for (var k = 1; k <= count; k++) {
    var row = get_status_model();
    var row2 = get_transaction_model();
    row.Company = userinfo.Company;
    no = t + k;

    row.LabelNum = create_barcode(no + ""); //条码
    row.PartNum = param.JobMtl_PartNum; //物料编号
    row.PartDescription = param.JobMtl_Description;  //物料编号
    row.IUM = param.JobMtl_IUM;  //物料编号
    row.LotNum = "";
    if(param.LotNum){
      row.LotNum = param.LotNum; //批号

    }
    
    row.BinNum = BinNum;
    row.WarehouseCode = WarehouseCode;


    row.OnhandQty = param.IssuedQty; //数量
    row2.PartNum = row.PartNum;
    row2.Company = row.Company;
    row2.LotNum = row.LotNum;
    row2.LabelNum = row.LabelNum;
    row2.ToBinNum = BinNum;
    row2.ToWarehouseCode = WarehouseCode;
    row2.PartDescription = row.PartDescription;
    row2.TranQty = parseInt(row.OnhandQty);
    row2.TranDate = app.searchdata.ArrivedDate;
    row2.TranType = "MTL-STK";

    row2.IUM = row.IUM;
    row2.POLine = 0; //采购单行
    row2.PackSlip = ""; //送货单号
    row2.PackLine = 0;

    if (param) {
      row2.JobSeq = param.JobMtl_MtlSeq;
      row2.AssemblySeq = param.JobMtl_AssemblySeq;
      row2.JobNum = param.JobMtl_JobNum;
    }


    row2.PONum = 0; //物料编号

    app.$set(app.$data.goodlist[i], 'tag', row);
    app.$set(app.$data.goodlist[i], 'tag2', row2);

    // barcode.push(row);
    // barcode2.push(row2);

 
  }
  console_debug(row,row2);

 // app.print_barcode = true;
 // app.check_canclick();



}